package Text.Text003;
/*
* 定义一对夫妻
* */
public class Text003 {
    public static void main(String[] args) {
//        创建一对男女
        Husband zhangsan = new Husband();
        Wife lisi = new Wife();

        zhangsan.setName("张三");
        lisi.setName("李四");
        System.out.println("**********************");

//        让他们结婚
        zhangsan.setWife(lisi);
        lisi.setHusband(zhangsan);
        System.out.println(zhangsan.getName() + "的妻子是" + zhangsan.getWife().getName());
        System.out.println(lisi.getName() + "的丈夫是" + lisi.getHusband().getName());
        System.out.println("**********************");

//        日常生活
        zhangsan.work();
        zhangsan.feed();
        lisi.eat();
        System.out.println("**********************");

    }
}
